package com.kgc.excpt;

/**
 * Created on 2021/6/21.
 * Author: lzy
 * Description: 系统自定义异常
 */
public enum SysExceptionEnum {

    /**
     * 系统异常
     * */
    SYSTEM_EXCPT("9000","系统异常"),
    /**
     * 传入参数为空
     */
    REQUEST_PARAM_EMPTY("1001","传入参数为空"),
    /**
     * 传入参数非法
     */
    REQUEST_PARAM_TLLEGAL("1002","传入参数非法"),
    /**
     * 数据库异常
     */
    DATABASE_OPRRATOR_EXCPT("3001","数据库操作异常"),
    /**
     * 网络异常
     */
    NETWORK_CONNECT_EXCPT("5001","网络连接异常"),
    /**
     * elasticsearch连接失败
     */
    ELASTICSEARCH_CONNECT_EXCPT("3099","ELASTICSEARCH连接失败"),

    /**
     * token失效
     */
    TOKEN_ISLOST_EXCPT("3098","token失效，请用户重新登录");


    /**
     * 异常码
     * */
    private String excptCode;

    /**
     * 异常说明
     * */
    private String excptMsg;

    /**
     * 带参构造方法
     * */
    SysExceptionEnum(String excptCode,String excptMsg){
        this.excptCode = excptCode;
        this.excptMsg = excptMsg;

    }

    public String getExcptCode() {
        return excptCode;
    }

    public String getExcptMsg() {
        return excptMsg;
    }



}
